<?php

namespace common\models;

use Yii;
use yii\behaviors\TimestampBehavior;

/**
 * This is the model class for table "{{%shop_cards}}".
 *
 * @property integer $id
 * @property string $card_id
 * @property string $card_name
 * @property integer $status
 * @property integer $weight
 * @property string $created_at
 * @property string $updated_at
 * @property string $res1
 * @property string $res2
 */
class ShopCards extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%shop_cards}}';
    }

    public function behaviors()
    {
        return [
            TimestampBehavior::className(),
        ];
    }


    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['status', 'weight', 'created_at', 'updated_at'], 'integer'],
            [['card_id', 'card_name', 'res1', 'res2'], 'string', 'max' => 40]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'card_id' => 'Card ID',
            'card_name' => 'Card Name',
            'status' => 'Status',
            'weight' => 'Weight',
            'created_at' => 'Created At',
            'updated_at' => 'Updated At',
            'res1' => 'Res1',
            'res2' => 'Res2',
        ];
    }
}
